<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-carinfo-edit" th:object="${carinfo}">
            <input id="carinfoId" name="carinfoId" th:field="*{carinfoId}"  type="hidden">
			<input id="huiYuanId" name="huiYuanId" th:field="*{huiYuanId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">货车车牌号：</label>
				<div class="col-sm-8">
					<input id="carNumber" name="carNumber" th:field="*{carNumber}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">车辆品牌：</label>
				<div class="col-sm-8">
					<input id="carPinPai" name="carPinPai" th:field="*{carPinPai}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">车辆类型：</label>
				<div class="col-sm-8">
					<select id="carType" name="carType" class="form-control m-b" th:with="type=${@dict.getType('sys_car_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{carType}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">燃油标号：</label>
				<div class="col-sm-8">
					<select id="ranyou" name="ranyou" class="form-control m-b" th:with="type=${@dict.getType('sys_ranyou_biaohao')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{ranyou}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">车辆颜色：</label>
				<div class="col-sm-8">
					<select id="yanse" name="yanse" class="form-control m-b" th:with="type=${@dict.getType('sys_car_yanse')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{yanse}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">尾气排放标准：</label>
				<div class="col-sm-8">
					<select id="weiqi" name="weiqi" class="form-control m-b" th:with="type=${@dict.getType('sys_weiqi_paifang')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{weiqi}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">载重量（吨）：</label>
				<div class="col-sm-8">
					<input id="carWeight" name="carWeight" th:field="*{carWeight}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">车辆状态：</label>
				<div class="col-sm-8">
					<div class="onoffswitch">
						<input type="checkbox" th:checked="${carinfo.status == '0' ? true : false}" class="onoffswitch-checkbox" id="status" name="status">
						<label class="onoffswitch-label" for="status">
							<span class="onoffswitch-inner"></span>
							<span class="onoffswitch-switch"></span>
						</label>
					</div>

				</div>
			</div>

		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/carinfo";
		$("#form-carinfo-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-carinfo-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
